home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Resources / Developers / XAMPP 1.5.4 / Windows installer / xampp-win32-1.5.4-installer.exe / xampp / contrib / sqlite.php < prev    next >
Text File  |  2006-03-23  |  708b  |  38 lines

  1. <html>
  2. <head>
  3. <title>PHP und SQLite</title>
  4. </head>
  5. <body>
  6. <h1>PHP und SQLite</h1>
  7. <table border="1">
  8. <tr>
  9.     <th>Interpret</th>
  10.     <th>Titel</th>
  11.     <th>Jahr</th>
  12. </tr>
  13. <?php
  14.     $db = sqlite_open('../sqlite/cdcol', '0666');
  15.  
  16.     $query = "SELECT * FROM cds";
  17.     $result = sqlite_query($db,$query);
  18.     if ($result) 
  19.     {
  20.         while ($row = sqlite_fetch_array($result))
  21.         {
  22.             echo "<tr>";
  23.             echo "<td>".$row['interpret']."</td>";
  24.             echo "<td>".$row['titel']."</td>";
  25.             echo "<td>".$row['jahr']."</td>";
  26.             echo "</tr>";
  27.         }
  28.     }
  29.     else
  30.     {
  31.         echo sqlite_error_string(sqlite_last_error($db));
  32.     }
  33.  
  34. ?>
  35. </table>
  36. </body>
  37. </html>
  38.